package ee.rawre.tafayc.util;

public class TypeVerifier {
   
   public static boolean isNumeric(String str) {
      try {
         @SuppressWarnings("unused")
         double d = Double.parseDouble(str); 
      } catch(NumberFormatException nfe) {
         return false;
      }
   return true;  
   } 
   
   public static int[] convertStringArraytoIntArray(String[] sarray) throws Exception {
      if (sarray != null) {
         int intarray[] = new int[sarray.length];
         for (int i = 0; i < sarray.length; i++) {
            intarray[i] = Integer.parseInt(sarray[i]);
         }
         return intarray;
      }
      return null;
   }
}
